function WarlockG1zStar3() -- destro

	if not ThrottleFrame then _ThrottleFrame() end

	if _ImmolateThrottle == nil then _ImmolateThrottle = 0 end
	if nMobTargetCount == nil then nMobTargetCount = 0 end

	if not ccrPHB(109773) and not IsMounted() then ccrCast(109773, "player") return end -- dark intent

	if ccrPIIC() then

		pullallunitsm("Immolate")
		
		nMobTargetCount = GTargetCount(8)

		if ccRS.G1zStarThokThrottle and ThokThrottle and GetTime()*1000 < ThokThrottle and ccrPICAOCH() then
			if ccrPICA() then
				local _, _, _, _, _, tEnd = UnitCastingInfo("player")
				if tEnd > ThokThrottle then SpellStopCasting() end
			else
				local _, _, _, _, _, tEnd = UnitChannelInfo("player")
				if tEnd > ThokThrottle then SpellStopCasting() end
			end
		end
	end

	local glovescd, glovesdur, glovesenable = GetInventoryItemCooldown("Player", 10)

	if ccrPIIC() and ccrValidTarget() then -- general stuff and AoE rotation

		if ccRS.G1zStarInterrupt then InterruptTrainer() end

		-- local ttd = G1zStarttd -- ttd disabled

		if SCA(1490) and not ccrTargetHasDebuff("Master Poisoner", 1) and not ccrTargetHasDebuff("Curse of the Elements", 1) and not ccrTargetHasDebuff("Fire Breath", 1) and not ccrTargetHasDebuff("Lightning Breath", 1) then
			ccrCastAttack(1490)
			return
		end -- Magic Debuff

		-- gloves
		if useCDS and glovesenable == 1 and glovescd == 0 then
			UseInventoryItem(10)
			return
		end

		-- if usePOT and (GLUST() or (ccrTargetIsBoss() and TTD[Target.GUID] and TTD[Target.GUID] <= 20)) then usePOT() end

		if useCDS and UnitRace("Player") == "Troll" and SIR(26297) then ccrCast(26297)  return end -- berserking 
		if useCDS and UnitRace("player") == "Orc" and SIR(33702) then ccrCast(20572) return end -- blood fury 
		if useCDS and SIR(113858) and (not ccrPlayerHasTalent("Archimonde's Darkness") or (GetSpellCharges(113858) == 2 or ccrPHB(146046) --[[wrath of the dark spear \ black blood of y'shaarj]] or ccrTargetHealth() <= 10)) then
			ccrCast(113858)
		end -- dark soul

		-- service pet if off cd and enabled

	if nMobTargetCount > 3 and (ccRS.Auto_AoE or ccRS.Manual_AoE) then

		if useCDS and SIR(112921) then
			if ccrPlayerHasTalent("Grimoire of Supremacy") then
					GCast(Target.GUID, 112921, GSmartAoE(30, 10, tapped))
					-- ccrCast(112921)
					-- CastAtLocation(Target:GetLocation())
				return
			else
					GCast(Target.GUID, 1122, GSmartAoE(31, 10, tapped))
					-- ccrCast(1122)
					-- CastAtLocation(Target:GetLocation())
				return
			end
		end -- Abyssal

			if SIR(104232) and not ccrPHB(104232) and (GDistance(Target.GUID) <= select(9, GetSpellInfo(104232))) then
				GCast(Target.GUID, 104232, GSmartAoE(35, 8))
				-- ccrCast(104232)
				-- CastAtLocation(Target:GetLocation())
			return
		end -- RoF

		if ccrEmbers() > 9 and not ccrPHB(108683) then ccrCast(108683) end -- FnB
			if --[[ccrEmbers() > 14 and]] SCA(108686) and not ccrTargetHasMyDebuff(108686) and not ccrTargetHasDebuff(145065) and not ccrTargetHasDebuff(145171) then ccrCastAttack(108686) return end -- Immolate AoE
		if SCA(108685) then ccrCastAttack(108685) return end -- conflagrate AoE
		if SCA(114654) then ccrCastAttack(114654) return end -- incinerate AoE
		if SCA(29722) then ccrCastAttack(29722) return end -- incinerate
		return
	end
	end

	if ccrPIIC() and ccrValidTarget() then

		if ccrPHB(108683) then CancelUnitBuff("player", "Fire and Brimstone") end

		if useCDS and SIR(112927) then
			if ccrPlayerHasTalent("Grimoire of Supremacy") then
				ccrCast(112927)
				return
			else
				ccrCast(18540)
				return
			end
		end -- doomguard

		if nMobTargetCount > 1 and not ccrPHB(104232) and (GDistance(Target.GUID) <= select(9, GetSpellInfo(104232))) then
			GFace(Target.GUID)
			GCast(Target.GUID, 104232, GSmartAoE(35, 85))
			-- ccrCast(104232)
			-- local X, Y, Z = IGetLocation(Target.GUID)
			-- CastAtLocation(X + math.random(-0.01, 0.01), Y + math.random(-0.01, 0.01), Z + math.random(-0.01, 0.01))
			return
		end -- RoF

		if SIR(80240) and (ccRS.Auto_AoE or ccRS.Manual_AoE) and GSelect("health") then -- havoc testing
			GCast(GSelect("health"), 80240)
		end

		-- if SIR(80240) and then return end -- havoc support
		-- possible mobs would be
		-- fallen protectors all 3 bosses
		-- norushen: big adds or boss
		-- sha of pride big add
		-- kor'kron dark shaman whichever you're not targetting
		-- general nazgrim himself only if not in defensive
		-- Thok himself or add
		-- Siegecrafter add
		-- paragons scumbagging it up
		-- Garrosh Weapons

		if SCA(17877) and (ccrEmbers() > 35 or ccrPM() <= 20 or (TTD[Target.GUID] and TTD[Target.GUID] < 20) or (ccrPHB(80240) and not ccrTargetHasMyDebuff(80240))--[[havoc need to add target check]] or ccrPHB(146046)--[[add black blood]]) then
			if _ShadowburnThrottle == 1 then return end
			GFace(Target.GUID)
			ccrCastAttack(17877)
			return
		end -- Shadowburn

		if (ccRS.Auto_AoE or ccRS.Manual_AoE) and ccrEmbers() > 9 then
			for k, v in pairs(TTD) do
				if GHealth(k) <= 20 and v < 20 --[[and not tContains(Dummies, IGetName(k))]] then
					GCast(k, 17877)
					return
				end
			end
		end

		-- add cycle shadowburn support

		if SCA(116858) and ccrTargetHealth() > 20 and not ccrPIM() and (not ccrPHBS(117828, 3) or (nMobTargetCount > 1 and select(7, GetSpellInfo(29722))/1000 < 1)) and (ccrEmbers()/10 > (4.5-nMobTargetCount) or ((ccrPHB(146046) and not ccrPHBR(146046, select(7, GetSpellInfo(116858))/1000))) or (tLastSkullBanner and tSkullBanner-GetTime() > select(7, GetSpellInfo(116858))/1000)) then -- skull banner needs to be implemented
			-- if _ChaosBoltThrottle == 1 then return end
			GFace(Target.GUID)
			ccrCastAttack(116858)
			return
		end -- chaos bolt need to implement black blood
		
		if SCA(116858) and ccrTargetHealth() > 20 and not ccrPIM() and ccrPHBS(80240, 3) and not ccrTargetHasMyDebuff(80240) and not ccrPHBR(80240, select(7, GetSpellInfo(116858))/1000) then
			-- if _ChaosBoltThrottle == 1 then return end
			GFace(Target.GUID)
			ccrCastAttack(116858)
			return
		end -- chaos bolt havoc need to implement auto havoc

		if --[[SIR(348) and ]]not ccrPIM() and (ccRS.Manual_AoE or ccRS.Auto_AoE) and #tNoObjectImmolate > 0 then
			for i = 1, #tNoObjectImmolate do
				if _G[tNoObjectImmolate[i].." ImmolateThrottle"] == nil then _G[tNoObjectImmolate[i].." ImmolateThrottle"] = 0 end
				if _ImmolateThrottle == 0 and _G[tNoObjectImmolate[i].." ImmolateThrottle"] == 0 and SCA("Immolate", _G[tNoObjectImmolate[i]]) then
					GFace(tNoObjectImmolate[i])
					GCast(tNoObjectImmolate[i], "Immolate")
					return
				end
			end
		end

		if _G[Target.GUID.." ImmolateOldCrit"] == nil then _G[Target.GUID.." ImmolateOldCrit"] = 0 end
		if _G[Target.GUID.." ImmolateThrottle"] == nil then _G[Target.GUID.." ImmolateThrottle"] = 0 end
		-- exp
			if _ImmolateThrottle == 0 and (ccRS.Auto_AoE or ccRS.Manual_AoE) and not ccrPIM() then
				for i = 1, #tImmolate do
					local tar = tImmolate[i]
					if _G[tar.." ImmolateThrottle"] == 0 and not GAura(tar, 145065) and not GAura(tar, 145171) and SCA(348, tar) and ((15/(3/(1+UnitSpellHaste("player")/100))) * GetSpellCritChance(3) > 3 * TicksRemaining(tar, 348) * _G[tar.." ImmolateOldCrit"]) then
						GFace(tar)
						GCast(tar, 348)
						return
					end
				end
			end
		-- exp
		if not (ccRS.Auto_AoE or ccRS.Manual_AoE) and _ImmolateThrottle == 0 and not ccrPIM() and _G[Target.GUID.." ImmolateThrottle"] == 0 and not ccrTargetHasDebuff(145065) and not ccrTargetHasDebuff(145171) and SCA(348) and ((15/(3/(1+UnitSpellHaste("player")/100))) * GetSpellCritChance(3) > 3 * TicksRemaining("t", 348) * _G[Target.GUID.." ImmolateOldCrit"]) then -- target guid
			GFace(Target.GUID)
			ccrCastAttack(348)
			return
		end -- immolate single target -- disabled for testing
		if ccrPIM() and not ccrPHB(104232) and SIR(104232) and (GDistance(Target.GUID) <= select(9, GetSpellInfo(104232))) then
			ccrCast(104232)
			CastAtLocation(Target:GetLocation())
			return
		end  -- moving rain of fire
		if SCA(17962) and (ccrTargetHealth() <= 10 or not ccrPHB(117828)) then
			GFace(Target.GUID)
			ccrCastAttack(17962)
			return
		end -- conflagrate
		if ccrPlayerHasTalent("Kil'jaeden's Cunning") then
			if SCA(29722) then
			if not ccrPIM() then GFace(Target.GUID) end
			ccrCastAttack(29722)
			return
			end
		else
			if SCA(29722) and not ccrPIM() then
			GFace(Target.GUID)
			ccrCastAttack(29722)
			return
			end
		end -- incinerate
		if SCA(77799) and ccrPIM() then
			ccrCastAttack(77799)
			return
		end -- fel flame
	end
end